Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the PostgreSQL server foundation requested in stage 2 of #384, adapting the storage work from #365 onto the merged core split. Internal review: Traviis#1.
codesearch-serverwith server-owned SQLx/pgvector dependencies; standalone CLI keeps its local storage path.Boundaries and decisions for review
This PR is the storage/server foundation, not the remaining roadmap. Authentication, federation/MCP integration, thin-client publishing, designated-indexer scheduling and working-copy namespaces remain separate stages. The HTTP endpoints exercise the foundation; they are not the final chunk-publisher/federation protocol.
Two implementation choices to call out:
Requires pg_search 0.27.1 and pgvector >=0.8. Database embedding/document identity mismatches are rejected without destructive resets; incompatible identities require intentional reindex into a separate database. Setup and current HTTP contract:
server/README.md.Independent server release automation remains outstanding. Service must not be exposed to untrusted/network callers before authentication is implemented.
Correctness coverage
Behavioral regressions cover final prepared-document cache identity (including long-function rename/split headers), extracted documentation persistence/search, explicit nullable deletion payloads, malformed notebook preservation, physical inclusive split-source ranges, pagination beyond1000 repositories, repeated pg_search prepared queries and deterministic shared-cache insertion order. Core changes expose shared provider/document preparation and narrowly correct split source coordinates; notebook execution is not introduced.
Verification
Passed on the reviewed functional tree:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --lib --bins: 436 +433 +744 +8 passed, existing ignored tests retained.cargo test -p codesearch-server --no-default-features --features load-dynamic --lib -- --include-ignored --nocapture.text-embedding-3-small1024-dimensional inference:14 source files across5 repositories,174 chunks. Seven source-grounded questions evaluated in vector/hybrid modes: expected source in top5 for14/14 evaluations (13rank1,one rank3).Failure-isolation integration tests use an explicitly simulated deterministic HTTP embedding provider; the separate live-corpus run uses actual inference. No scale, abrupt database crash, backup restore, local ONNX inference or production TLS qualification claimed. Test-command-only Git signing disabled for disposable Git fixtures; no user configuration changes. Temporary Nix tooling used, no repository Nix setup.
Fresh independent full-diff review read the complete #365/#384 discussion without prior reviewer reports and found no issues; this is review evidence, not maintainer acceptance. Subsequent edits only restored the package description and made the server README operational rather than historical.